#!/bin/bash

# 1. 用户的变量
# 2. 密码
# 3. 用户输入
# 4. 比较
user_name="abbott"
password="123456"

read -p  "请输入用户名："  login_name
[ $user_name  ==  $login_name ]  && echo  "用户名输入正确" || echo  "用户名输入错误，请检查！！"
read -p  "请输入密码："   login_pass
[ $password  ==  $login_pass ] &&  echo "密码输入正确" || echo "密码输入错误，请重试！！！"


#计算 + -  
read  -p  "请输入a的值；注意整数" a
read  -p  "请输入b的值；注意整数" b
# c=`expr $a + $b`
# d=`expr $a - $b`
# d1=`expr $a \* $b`
# d3=`expr $a / $b`
# d2=`expr $a % $b`

# echo  "$a + $b = $c"
# echo  "$a - $b = $d"
# echo  "$a * $b = $d1"
# echo  "$a / $b = $d3"
# echo  "$a % $b = $d2"

c=`expr $a + $b`
echo "$a+$b=$c"
c=`expr $a - $b`

echo "$a+$b=$c"
c=`expr $a \* $b`
echo "$a + $b=$c"
c=`expr $a / $b`
echo  "$a / $b=$c"
c=`expr $a % $b`
echo "$a % $b=$c"